import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Sub from '../views/home/Sub' // 首页
import Special from '../views/home/Special' // 专题
import Message from '../views/home/Message' // 资讯
import Word from '../views/home/Word' // 留言
import Down from '../views/home/Down' // 下载
import Sous from '../views/home/Sous' // 下载


import Movie from '../views/home/sub/Movie'// 电影
import Sitcom  from '../views/home/sub/Sitcom' // 连续剧
import Page from '../views/home/sub/Page' // 综艺
import Dongman from '../views/home/sub/Dongman' // 动漫

Vue.use(VueRouter)

  const routes = [
  {
    path: '/',
    redirect: '/home/sub/Movie',// 重定向
  },
  {
    path: '/home',
    component: Home,
    children: [
      {
        path: 'sub',
        component: Sub,
        redirect: '/home/sub/Movie',// 重定向
        children:[
          {
            path:'movie',
            component:Movie
          },
          {
            path:'page',
            component:Page
          },
          {
            path:'sitcom',
            component:Sitcom
          },
          {
            path:'dongman',
            component:Dongman
          }
        ]
      },
      {
        path:'down',
        component: Down,
      },
      {
        path:'special',
        component: Special,
      },
      {
        path:'message',
        component: Message,
      },
      {
        path:'word',
        component: Word,
      },
      {
        path:'sou',
        component: Sous,
      }
    ]
  }
]


const router = new VueRouter({
  routes
})

export default router
